#include<iostream>
#include<string.h>
#include<stdlib.h>
#define MAX 30001
using namespace std;

int n;
int visited[MAX]={0};
bool isJolly;

int abs(int n) {
   return (n<0)? -n : n;
}

void read() {
   int a, b;
   int tmp;
   while(cin >> n) {
      isJolly = true;
      memset(visited, 0, sizeof(visited));
      cin >> a;
      for(int i=1; i<n; i++) {
         cin >> b;
         tmp = abs(a-b);
         if(tmp <= 0 || tmp > n-1) {
            isJolly = false;
         }
         else {
            if(visited[tmp])
               isJolly = false;
            visited[tmp] = 1;
         }
         a = b;
      }
      if(isJolly)
         cout << "Jolly" << endl;
      else
         cout << "Not jolly" << endl;
   }   
}

int main() {
   read();
   return 0;
}
